this is my improved  and improved button code